<template>
	<div class="zujian">
		<ul class="SetPayPwd-Input-Ul">
			<li ref='li' :style="{height:height + 'px'}"><i v-if="Pwd.length>0"></i></li>
			<li :style="{height:height + 'px'}"><i v-if="Pwd.length>1"></i></li>
			<li :style="{height:height + 'px'}"><i v-if="Pwd.length>2"></i></li>
			<li :style="{height:height + 'px'}"><i v-if="Pwd.length>3"></i></li>
			<li :style="{height:height + 'px'}"><i v-if="Pwd.length>4"></i></li>
			<li :style="{height:height + 'px'}"><i v-if="Pwd.length>5"></i></li>
			<!--<input type="number" name="Pwd" id="" value="" class="PwdInput" v-model="Pwd" autocomplete='off' ref='pwd' @blur="shiqu()"/>-->
		</ul>

	</div>
</template>

<script>
	export default {
		name: 'zujian',
		props: ['top', 'topn'],
		data() {
			return {
				height: 0,
				Pwd: '',
				Test: '',
				oldNum: '',
				Stu: true,
			}
		},
		created: function() {},
		methods: {
		},
		watch: {
			Pwd(e) {
				if(this.Pwd.length>5)
				{
					this.bus.$emit('PwdFine',this.Pwd);
				}
			}
		},
		mounted() {
			var vm = this;
			this.height = this.$refs.li.offsetWidth;
			this.bus.$on('Number', function(Number) {
				if(vm.Pwd.length<6)
				{
					vm.Pwd += Number
				}
				
			})
			this.bus.$on('Del', function(Number) {
				if(Number == 1)
				{
					vm.Pwd = vm.Pwd.substring(0,parseInt(vm.Pwd.length)-1)
				}
			})
		}
	}
</script>

<style scoped>
	.zujian {
		width: 100%;
		height: auto;
	}
	
	.SetPayPwd-Input-Ul {
		width: 100%;
		height: auto;
		margin: 0;
		padding: 0;
		border: 2px solid #dadada;
		box-sizing: border-box;
		overflow: hidden;
		background-color: #FFF;
		border-radius: 8px;
		margin-bottom: 50px;
	}
	
	.SetPayPwd-Input-Ul>li {
		width: calc(100% / 6);
		height: 110px;
		box-sizing: border-box;
		border-right: 2px solid #dadada;
		float: left;
		text-align: center;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.SetPayPwd-Input-Ul>li>i {
		padding: 0;
		margin: 0;
		width: 15PX;
		height: 15PX;
		background-color: #353535;
		border-radius: 50%;
		box-sizing: border-box;
	}
	
	.SetPayPwd-Input-Ul>li:nth-of-type(6) {
		border-right: 0px solid #dadada;
	}
	
	.PwdInput {
		position: absolute;
		opacity: 1;
		/*display: none;*/
		z-index: -1;
		top: 0;
		width: 100%;
		left: 0;
		height: 100%;
		top: 0;
		color: transparent;
		text-shadow: 0 0 0 red;
		left: -100%;
	}
</style>